﻿<div class="form-field">
	<#if form.mode == "view">
		<table>
		<div class="viewmode-field">
			<#if field.mandatory && !(field.value?is_number) && field.value == "">
				<span class="incomplete-warning"><img src="${url.context}/res/components/form/images/warning-16.png" title="${msg("form.field.incomplete")}" /><span>
			</#if>
			<span class="viewmode-label">${field.label?html}:</span>
			<#if field.control.params.activateLinks?? && field.control.params.activateLinks == "true">
				<#assign fieldValue=field.value?html?replace("((http|ftp|https):\\/\\/[\\w\\-_]+(\\.[\\w\\-_]+)+([\\w\\-\\.,@?\\^=%&:\\/~\\+#]*[\\w\\-\\@?\\^=%&\\/~\\+#])?)", "<a href=\"$1\" target=\"_blank\">$1</a>", "r")>
			<#else>
				<#if field.value?is_number>
					<#assign fieldValue=field.value?c>
				<#else>
					<#assign fieldValue=field.value?html>
				</#if>
			</#if>
			<span class="viewmode-value"><#if fieldValue == "">${msg("form.control.novalue")}<#else>${fieldValue}</#if></span>
		</div>
		<#else>
			<tr>
				<td>
					<label for="${field.control.params.nameId}">${field.control.params.title}</label>
					<span class="yui-button yui-push-button">
					<span class="first-child">
						<button id="${field.control.params.nameId}" type="button" name="${field.control.params.nameId}" onclick="${field.control.params.onClick}" tabindex="0">Registruoti</button>
					</span></span>
				</td>
			</tr>
			<tr>
				<td>
					<div id="responseStatus"></div><br />
					<div id="loader" style="display:none;"><img src="${url.context}/res/components/images/ajax-loader.gif" alt="Prašome palaukti"></div>
				</td>
			</tr>
		</table>
	</#if>
</div>